package com.openvas.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.openvas.mapper.TableOperatingSystemMapper;
import com.openvas.domain.TableOperatingSystem;
import com.openvas.service.ITableOperatingSystemService;
import com.openvas.commons.common.core.text.Convert;

/**
 * 操作系统Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-04
 */
@Service
public class TableOperatingSystemServiceImpl implements ITableOperatingSystemService 
{
    @Autowired
    private TableOperatingSystemMapper tableOperatingSystemMapper;

    /**
     * 查询操作系统
     * 
     * @param id 操作系统主键
     * @return 操作系统
     */
    @Override
    public TableOperatingSystem selectTableOperatingSystemById(Long id)
    {
        return tableOperatingSystemMapper.selectTableOperatingSystemById(id);
    }

    /**
     * 查询操作系统列表
     * 
     * @param tableOperatingSystem 操作系统
     * @return 操作系统
     */
    @Override
    public List<TableOperatingSystem> selectTableOperatingSystemList(TableOperatingSystem tableOperatingSystem)
    {
        return tableOperatingSystemMapper.selectTableOperatingSystemList(tableOperatingSystem);
    }

    /**
     * 新增操作系统
     * 
     * @param tableOperatingSystem 操作系统
     * @return 结果
     */
    @Override
    public int insertTableOperatingSystem(TableOperatingSystem tableOperatingSystem)
    {
        return tableOperatingSystemMapper.insertTableOperatingSystem(tableOperatingSystem);
    }

    /**
     * 修改操作系统
     * 
     * @param tableOperatingSystem 操作系统
     * @return 结果
     */
    @Override
    public int updateTableOperatingSystem(TableOperatingSystem tableOperatingSystem)
    {
        return tableOperatingSystemMapper.updateTableOperatingSystem(tableOperatingSystem);
    }

    /**
     * 批量删除操作系统
     * 
     * @param ids 需要删除的操作系统主键
     * @return 结果
     */
    @Override
    public int deleteTableOperatingSystemByIds(String ids)
    {
        return tableOperatingSystemMapper.deleteTableOperatingSystemByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除操作系统信息
     * 
     * @param id 操作系统主键
     * @return 结果
     */
    @Override
    public int deleteTableOperatingSystemById(Long id)
    {
        return tableOperatingSystemMapper.deleteTableOperatingSystemById(id);
    }
}
